import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_fai_webview/flutter_fai_webview.dart';
import 'package:flutter_pdfview/flutter_pdfview.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../../l10n/messages.dart';

class ViewAgreementView extends StatefulWidget {
  const ViewAgreementView({super.key, required this.url});
  final String url;
  @override
  State<ViewAgreementView> createState() => _ViewAgreementViewState();
}

class _ViewAgreementViewState extends State<ViewAgreementView> {
  @override
  Widget build(BuildContext context) {
    var messages = AppLocalizations.of(context)!;
    final screenSize = MediaQuery.of(context).size;
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        backgroundColor: Colors.white,
        title: Text("预览",style: TextStyle(color: Colors.black,fontWeight: FontWeight.w300,fontSize: 16.sp),),
        centerTitle: true,
      ),
      body:

      PDFView(
        filePath:widget.url,
        autoSpacing: true,
        pageSnap: true,
      ),
      // Container(
      //   // height: screenSize.height-140.h,
      //   child:  FaiWebViewWidget(
      //     // 你可以在这里配置 WebView 的属性和参数
      //     url:widget.url, // 替换为你要加载的网页URL
      //     isLog: true,
      //
      //   ),
      //
      // ) ,
    );
  }
}
